package main

import (
	"fmt"
	"os"
)

func main() {
	file, err := os.OpenFile("/Users/dean/GoWorks/src/gomod/exercise/a.txt", os.O_RDWR|os.O_APPEND, os.ModePerm)
	if err != nil {
		fmt.Println(err)
		return
	}
	defer file.Close()

	bs := []byte{65, 66, 67}
	n, err := file.Write(bs)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(n)

	n, err = file.WriteString("dsadda")
	if err != nil {
		fmt.Println(nil)
		return
	}
	fmt.Println(n)

}
